Write-Host "航班查询系统启动脚本"
Write-Host "===================="
Write-Host ""

# 检查PHP是否已安装
$phpVersion = php -v 2>$null
if (-not $phpVersion) {
    Write-Host "错误：未找到PHP。请确保PHP已正确安装并添加到系统环境变量中。" -ForegroundColor Red
    Write-Host "您可以访问 https://www.php.net/downloads 下载PHP。" -ForegroundColor Yellow
    pause
    exit 1
}

Write-Host "正在启动PHP内置服务器..." -ForegroundColor Green
Write-Host "访问地址: http://localhost:8000" -ForegroundColor Cyan
php -S localhost:8000